/**
 * 
 */
package org.sensmon.gui;

import java.awt.Component;

import javax.swing.JList;
import javax.swing.ListCellRenderer;

/**
 * @author LAP
 *
 */
public class SensorPaneListRenderer implements ListCellRenderer<SensorPane> {

	@Override
	public Component getListCellRendererComponent(JList<? extends SensorPane> list, SensorPane value, int index, boolean isSelected, boolean cellHasFocus) {
		if (isSelected) {
			value.setBackground(list.getSelectionBackground());
		}
		else {
			value.setBackground(list.getBackground());
		}
		return value;
	}

}
